package com.lv.common.widget.recyclerview

import android.view.View
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lihang.ShadowLayout
import com.lv.common.base.DataBindBaseViewHolder
import com.lv.common.imp.ItemTouchHelperViewHolder
import com.lv.common.utils.showToast

/**
 * 作者： ygx
 * 创建日期：2023/4/24 9:14 AM
 * 签名： 天行健，君子以自强不息；地势坤，君子以厚德载物。
 * -    _              _           _     _   ____  _             _ _
 * -   / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
 * -  / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
 * - / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
 * -/_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
 * <p>
 * You never know what you can do until you try !
 * ----------------------------------------------------------------
 * 描述：
 */
class DragTouchHolder(view: View) : DataBindBaseViewHolder(view), ItemTouchHelperViewHolder {


    override fun onItemSelected(view: ShadowLayout?) {
        view?.setShadowHiddenBottom(false)
        view?.setShadowHiddenTop(false)
        view?.setShadowHiddenLeft(false)
        view?.setShadowHiddenRight(false)
        view?.scaleY = 1.06f
    }

    override fun onItemClear(view: ShadowLayout?) {
        view?.scaleY = 1.0f
        view?.setShadowHiddenBottom(true)
        view?.setShadowHiddenTop(true)
        view?.setShadowHiddenLeft(true)
        view?.setShadowHiddenRight(true)
    }


}